package com.service.impl;

import com.dao.EmployeeDao;
import com.domain.Employee;
import com.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    private EmployeeDao employeeDao;

    //查找所有员工信息
    @Override
    public List<Employee> findAll() {
        List<Employee> employees = employeeDao.findAll();
        return employees;
    }

    //添加员工
    @Override
    public void save(Employee employee) {
        employeeDao.save(employee);
    }
}
